<?php
namespace app\common\repositories\info;
use app\common\repositories\BaseRepository;
use app\common\dao\info\OrderDao as dao;
/**
 * @mixin dao
 */
class OrderRepository extends BaseRepository
{
    public function __construct(dao $dao)
    {
        $this->dao = $dao;
    }

    public function getList($where,$page,$limit)
    {
        $count = $this->dao->search($where)->count();
        $list = $this->dao->search($where)->page($page,$limit)->append(['shopName'])->order('order_id desc')->select();
        return compact('count','list');
    }
}